Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash with StreamSocket and TLS #4535

Merged
merged 2 commits into from
Sep 24, 2024
Merged

Conversation

guedou
Copy link
Member

@guedou guedou commented Sep 19, 2024

Bug found during ScapyCon. Is it worth a test?

This script crashes before applying the PR:

import socket

from scapy.all import *


load_layer("tls")

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("secdev.org", 443))

ssck = StreamSocket(sock, TLS)

ssck.send(TLS(msg=TLSClientHello()))
msg = ssck.recv()
msg.show()

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.59%. Comparing base (30b0398) to head (6fc8ed7).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
scapy/layers/tls/session.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #4535    +/-   ##
========================================
  Coverage   81.58%   81.59%            
========================================
  Files         356      356            
  Lines       85292    85567   +275     
========================================
+ Hits        69589    69820   +231     
- Misses      15703    15747    +44     
Files with missing lines Coverage Δ
scapy/layers/tls/session.py 87.03% <50.00%> (-0.11%) ⬇️

... and 8 files with indirect coverage changes

polybassa
polybassa previously approved these changes Sep 20, 2024
@evverx
Copy link
Contributor

evverx commented Sep 22, 2024

Bug found during ScapyCon

I didn't know it was a thing. I think I saw a couple of talks/papers related to scapy on Usenix Security but didn't know about ScapyCon. Just out of curiosity I wonder if the talks were recorded? I looked for ScapyCon on YouTube but couldn't find anything. (It's unrelated to the PR. Sorry about that!)

@guedou
Copy link
Member Author

guedou commented Sep 23, 2024

It was the first ScapyCon organized by @polybassa ans his company. The focus was mainly on the automotive world. I guess that the videos will be available as I was not able to attend @phil777 keynote.

@polybassa
Copy link
Contributor

@evverx Thanks for your interest. We will definitly publish the videos on youtube within the next weeks.

@gpotter2 gpotter2 merged commit a07e5d5 into master Sep 24, 2024
25 checks passed
@gpotter2 gpotter2 deleted the 20240919/guedou/streamsocket-tls branch September 24, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants